#include "thread_pool.h"
void helloworld1()
{
    printf("\033[33m[helloworld1]\033[0mhello world1\n");
}
void helloworld2()
{
    printf("\033[33m[helloworld2]\033[0mhello world2\n");
}

int main()
{
    struct thread *t = new_thread();
    int err = create_thread_runner(t);
    while (1)
    {
        /* code */
        char code = getchar();
        if(code == 'e')break;
        add_task_into_thread_pool(t, helloworld1);
        add_task_into_thread_pool(t, helloworld2);
    }
    stop_thread_pool(t);
    free(t);
}